Database Explorer

Description

The Database Explorer provides a quick way to examine the properties of the tables and sets in your database. The Local Tables section lists the tables (including passive-link tables) and sets in your database. When you expand the Tables section and expand a table, you will see a list of the table's fields. The entry will contain the field type and length of each field. The Sets section lists the tables in each set and their linking relationships. A single arrow indicates a one-to-one relationship. A double arrow indicates a one-to-many relationship.

Open the Database Explorer

  1. Display the Control Panel.

  2. Select Tools > External Databases > Database Explorer.

  3. You can also open Database explorer from the Web Projects Control Panel by Selecting Tools > Database Explorer.

    images/UG_Database_Explorer.png

Add Database

The Database Explorer can display the contents of SQL back-end databases.

  1. Right click on (Local Tables) and select Add database to explorer... .

  2. Use the Connection String dialog to define the connection string that establishes the link to the back-end database.

    images/UG_Database_Explorer_Backend.png

Remove Database

The Database Explorer will display details about the fields of Tables, Views, and Linked Tables. To remove a database from the Database Explorer, right click on it and select Remove database from explorer... .

Remove Tables or Views

To remove tables or views listed under a back-end database:

  1. Right click on a back-end database and select Drop Table(s), View(s)... to display the Select Tables to Drop dialog.

  2. Optionally, limit the tables or views listed by de-selecting the Tables, Views, Linked Tables, Synonyms, and Aliases check boxes.

  3. Place checks to the left of the items you wish to drop.

  4. Click OK to continue.

Create a Passive-Link Table

To create a passive-link table based on a back-end database table.

  1. Expand a back-end database listing to display its tables.

  2. Right click on a table and select Save as ... > Passive-link table.

  3. Enter the new table name in the Specify Table Name dialog.

  4. Click OK to continue.

Create an Alpha Anywhere .DBF Table

To create an Alpha Anywhere table from the data in a back-end database table.

  1. Expand a back-end database listing to display its tables.

  2. Right click on a table and select Save as ... > Alpha Anywhere (.dbf) table.

  3. Enter the new table name in the Specify Table Name dialog.

  4. Click OK to continue.

Count Table Rows

To count the rows of a back-end database table.

  1. Expand a back-end database listing to display its tables.

  2. Right click on a table and select Count rows in table.

Display Table Data

To display the first 100 rows of a back-end database table.

  1. Expand a back-end database listing to display its tables.

  2. Right click on a table and select Show data in table.

Display Column Data

To display the data in a column in the first 100 rows of a back-end database table.

  1. Expand a back-end database listing to display its tables.

  2. Expand a table to display its column definitions.

  3. Right click on a column and select Show data in column.

Create a SQL Expression

To create and test a SQL expression for any of the attached databases:

  1. Optionally, right click on a back-end database and select Open Query Builder to display the SQL Genie.

  2. Optionally, right click on a back-end database and select Open SQL Command Window to display the SQL Command Window.

  3. Copy the finished SQL statement for use in your application.

Create a Layout

To create a layout based on the data in a back-end database table.

  1. Expand a back-end database listing to display its tables.

  2. Right click on a table and select Create Layout.

  3. Select Report, Label, or Letter to display the Design-Time Properties dialog.

  4. Enter the number of records to retrieve and click OK.

  5. If you are creating a report, continue with Creating Reports.

  6. If you are creating a label, continue with Create a Label Layout.

  7. If you are creating a letter, continue with Letter Overview.

Generate SQL Syntax

The Database Explorer can create SQL syntax for:

  • creating a table

  • inserting data into a table

  • deleting data from a table

  • updating data in a table

  1. Expand a back-end database listing to display its tables.

  2. Right click on a table and select SQL Syntax.

  3. Select an option:

    • Create table

    • Insert statement

    • Delete statement

    • Update statement

  4. Optionally, copy the code in the resulting window.

Open an Alpha Anywhere Layout

You can open any Alpha Anywhere layout:

  1. Expand (Local Tables) to display the Alpha Anywhere tables and sets.

  2. Right click on any table or set to select:

    • Default browse

    • Default form

    • Form, then any form layout

    • Browse, then any browse layout

    • Report, then any report layout

    • Label, then any label layout

    • Letter, then any letter layout

View an Alpha Anywhere Set's Structure

To view the structure, fields, and indexes of a set.

  1. Expand (Local Tables) to display the Alpha Anywhere sets.

  2. Right click on any set and select View set structure... to display the Set Information dialog.

View the properties of any table field

The Database Explorer lets you view the properties of any table field, i.e. basic schema information like field name, its type, and size. You can do this, for example, by right clicking on any given set and selecting 'Show Set Structure' from the dropdown. This should reveal the sets properties.

images/Database Explorer Field Set Info.png